<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="all.css" type="text/css" media="screen" />
    <link rel="stylesheet" type="text/css" href="jquery.lightbox-0.5.css" media="screen" />
    <script src="jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="jquery.lightbox-0.5.js"></script>
    <script src="edit.js"></script>
    <script src="login.js"></script>
    <script src="enter.js"></script>
<title>相册</title>

<script type="text/javascript">

window.onload=function(){
	rightH=document.getElementById("xc_right").offsetHeight;
	if(rightH<600){
	document.getElementById("xc_left").style.height=600+"px";}
	else{
		document.getElementById("xc_left").style.height=rightH+"px";
	}
	select();
}
$(function() {
	
	$('#right_xiangce .right_xiangce_xc1_lj').lightBox({fixedNavigation:true}); // Select all links in the page
	
});
</script>

</head>

<body>
<div id="main">
 <div id="header">
    <div id="header_inner">
        <div id="header_inner_top">
          <div id="container">
            <jsp:include page="./head.jsp" flush="true"/>
        </div>
        </div>
	</div>
 </div> 
	<div id="xc_body">
    	<div id="xc_left">
        	<div id="xc_left_left">
        		<div id="left_logo">
               		<a class="left_a" href="http://herald.seu.edu.cn" >
                 	
              		 </a>  
            	</div>
                <div id="left_platform">
               		<a class="left_a" href="http://herald.seu.edu.cn/league_p/" >
                 	
              		 </a>  
            	</div>
                <div id="left_home">
               		<a class="left_a" href="home.jsp?league=<%=request.getParameter("league") %>" >
                 	
              		 </a>  
            	</div>
                <div id="xc_left_information">
               		<a class="left_a" href="activities.jsp?league=<%=request.getParameter("league") %>" >
                 
              		 </a>  
            	</div>
                <div id="xc_left_album">
               		<a class="left_a" href="albums.jsp?league=<%=request.getParameter("league") %>" >
                 	
              		 </a>  
            	</div>
                <div id="left_recruiting">
               		<a class="left_a" href="recruit.jsp?league=<%=request.getParameter("league") %>" >
                 	
              		 </a>  
            	</div>
                <div id="left_polling">
               		<a class="left_a" href="polling.jsp?league=<%=request.getParameter("league") %>" >
                 
              		 </a>  
            	</div>
                <div id="left_guestbook">
               		<a class="left_a" href="guestbook.jsp?league=<%=request.getParameter("league") %>" >
                 	
              		 </a>  
            	</div>
    
            </div>
             <div id="xc_left_right">
             </div>
         </div>
         <div id="xc_right">
         	<div id="right_title_kuangjia">
         	<div id="right_title">
                <div id="right_title_name">
                   <p><c:out value="${leagueBean.name}" /></p>
                </div>
                <!--未登录  -->
                <c:if test="${leagueUserAuth == null&&commonUserAuth == null}">
                <div id="right_title_attention">
                	<div id="right_title_attention_plus">
                    </div>
                    <div id="right_title_attention_text">
                    <form id="attentionAddForm" action="./AttentionAdd">
                    <input name="league" type="hidden" value=<%=request.getParameter("league") %> />
                    <input name="url" type="hidden" id="url" value="" />
                    </form>
                        <a title="加关注" href="javascript:void(0)" onclick="javascript:alert('您好，请您先登录。')">加关注</a>
                    </div>
                </div>
                </c:if>
                
               <!--未加关注  -->
                <c:if test="${attention == false && leagueUserAuth == null && commonUserAuth != null}">
                <div id="right_title_attention">
                	
                    <div id="right_title_attention_text">
                    <form id="attentionAddForm" action="./AttentionAdd" onsubmit="return false;">
                    <input name="league" type="hidden" value=<%=request.getParameter("league") %> />
                    <input name="url" type="hidden" id="url" value="" />
                    </form>
                    
                        <a id="att" style="display:block" title="加关注&nbsp;&nbsp;" href="javascript:void(0)" onclick="javascript:attention(<%=request.getParameter("league") %>);"><div id="right_title_attention_plus">
                    </div>加关注</a>
                        <a id="cancleAtt" style="display:none" title="取消关注" href="javascript:void(0)" onclick="javascript:cancleAttention(<%=request.getParameter("league") %>);">取消关注</a>
                    </div>
                </div>
                </c:if>
                
                <!--已加关注-->
                <c:if test="${attention == true}">
                <div id="right_title_attention">
                    <div id="right_title_attention_text">
                    <form id="attentionDeleteForm" action="./AttentionDelete">
                    <input name="league" type="hidden" value=<%=request.getParameter("league") %> />
                    <input name="url" type="hidden" id="url" value="" />
                    </form>
                    <a id="att" style="display:none" title="加关注&nbsp;&nbsp;" href="javascript:void(0)" onclick="javascript:attention(<%=request.getParameter("league") %>);"><div id="right_title_attention_plus">
                    </div>加关注</a>
                    <a id="cancleAtt" style="display:block" title="取消关注" href="javascript:void(0)" onclick="javascript:cancleAttention(<%=request.getParameter("league") %>);">取消关注</a>
                    </div>
                </div>
                </c:if>
                
            </div>
            </div>
         
          <div id="right_xiangce">
                <div id="right_xiangce_title_kj">
          		<div id="right_xiangce_title">
                   <h1><a style="text-decoration:none;color:#FBC5C5;" href="./albums.jsp?league=<%=request.getParameter("league") %>">相册&nbsp;&nbsp;&nbsp;</a><c:out value="${albumBean.name}" /></h1>
                   
                </div>
                </div>
                <div id="right_xiangce_create_kj">
                <c:if test="${leagueUserAuth != null && param.league != null && leagueUserAuth.leagueId == param.league}">
                <div id="right_xiangce_create">
                	<a href="javascript:void(0)" onclick="javascript:showDiv()">创建相册</a>
                	<a href="javascript:void(0)" onclick="javascript:showDiv3()">为本相册添加照片</a>
                </div>
                </c:if>
                </div>
                <div id="right_xiangce_line_kj">
                <div id="right_xiangce_line">
                </div>
                </div>
                
                <c:forEach items="${pictures}" var="picture">
                <!--图片实体开始  -->
                <div class="picture_item">
                <div class="right_xiangce_caozuo_kj">
                <div class="right_xiangce_caozuo">
                 <c:if test="${leagueUserAuth != null && param.league != null && leagueUserAuth.leagueId == param.league}">
                	<div class="right_xiangce_bianji">
                		<a href="javascript:void(0)" onclick="javascript:showDivEdit(<c:out value="${picture.link}" />)">编辑</a>
                	</div>
                	</c:if>
                    <div class="right_xiangce_shanchu_kj">
                     <c:if test="${leagueUserAuth != null && param.league != null && leagueUserAuth.leagueId == param.league}">
                	<div class="right_xiangce_shanchu">
                		<a href="javascript:void(0)" onclick="javascript:showDivDelete(<c:out value="${picture.link}" />)">删除</a>
                	</div>
                	</c:if>
                    </div>
                 </div>
 				</div>
              
                <div class="right_xiangce_xc1_kj">
                <div class="right_xiangce_xc1" >
                
                	<a class="right_xiangce_xc1_lj" href="<c:out value="${picture.entity.address}" />">
                		<img src="<c:out value="${picture.entity.address}" />" width="305" height="190" alt="" />
                    </a>   
                </div>
                </div>
             
                <div class="right_xiangce_xc1_name_kj">
                <div class="right_xiangce_xc1_name">
                    <h3><c:out value="${picture.entity.name}" /></h3>
                </div>
                </div>
                
                </div>
                <!--图片实体结束 -->
                </c:forEach>
                
          </div>
     </div>   
     
     
     
     
<div id="popDiv" class="mydiv" style="display:none;">
添加相册
<form action="./AlbumAdd" method="post" enctype="multipart/form-data">
    
   
          <p>相册名称：<input type="text" name="picName" /></p>
    <p style="padding-left:89px;text-align:left;">相册封面：     <input type="file" name="fileforload" /></p>
 
  
   
    <p style="padding-left:100px;text-align:left;"><input type="submit" value="提交"  name="submit"  />
    <a style="padding-left:60px;"href="javascript:closeDiv()">关闭</a></p>
 </form></div>
<div id="bg" class="bg" style="display:none;"></div>
      
     
     
<div id="popDivEdit" class="mydiv" style="display:none;">修改图片名称
<form  action="./PictureEdit" method="post" >
    <input type="hidden" name="albumId" value="<%=request.getParameter("album") %>"/>
	<input id="newName" name="newName"type="text" />
    <input id="edit_item_id" type="hidden" name="picture" value="0" />
    <input type="submit" value="确定" name="submit" />
 </form>
<a href="javascript:closeDivEdit()">关闭</a></div>
<div id="bg" class="bg" style="display:none;"></div>

<div id="popDivDel" class="mydiv" style="display:none;">
确定删除图片？
<form  action="./PictureDelete" method="post" >
    <input type="hidden" name="albumId" value=<%=request.getParameter("album") %> />
    <input id="del_item_id" type="hidden" name="picture" value="0" />
    <input type="submit" value="确定" name="submit" />
</form>
<a href="javascript:closeDivDelete()">取消</a></div>
<div id="bg" class="bg" style="display:none;"></div> 

<div id="popDiv3" class="mydiv" style="display:none;">添加图片
<form  action="./PictureUpload" method="post" enctype="multipart/form-data">
    <input type="hidden" name="albumId" value=<%=request.getParameter("album") %> />
    <div id="uploadForm">
    <p>   
           图片名称：<input type="text" name="picName" /><input type="file" name="fileforload" />
    </p>
    </div>
   
    <p><input  style="margin-right:20px;"type="button" value="再添加一张" onclick="addUploadButton()"/>
    <input type="submit" value="提交" name="submit"/></p>
  </form>
<a href="javascript:closeDiv3()">关闭</a></div>
</div>
<div id="bg" class="bg" style="display:none;"></div>                  
 
         <div class="clear">
         </div>     
<jsp:include page="./footer.jsp" flush="true"/> 
</div>

</body>
</html>
